<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

$dictionary['editors_beneficiaries'] = array ( 'table' => 'editors_beneficiaries'
      , 'fields' => array (
       array('name' =>'id', 'type' =>'varchar', 'len'=>'36')
      , array('name' =>'beneficiary_id', 'type' =>'varchar', 'len'=>'36', )
      , array('name' =>'editor_id', 'type' =>'varchar', 'len'=>'36', )
      , array ('name' => 'date_modified','type' => 'datetime')
	  , array(
			'name'			=> 'primary_beneficiary',
			'type'			=> 'bool',
			'default'		=> '0',
		)
      , array('name' =>'deleted', 'type' =>'bool', 'len'=>'1', 'default'=>'0', 'required'=>false)
      )
      , 'indices' => array (
       array('name' =>'editors_beneficiariespk', 'type' =>'primary', 'fields'=>array('id'))
      , array('name' => 'idx_editor_beneficiary', 'type'=>'alternate_key', 'fields'=>array('editor_id','beneficiary_id'))
      , array('name' => 'idx_benid_del_editorid', 'type' => 'index', 'fields'=> array('beneficiary_id', 'deleted', 'editor_id'))
      )

      ,'relationships' => array (
			'editors_beneficiaries' => array(
				'lhs_module'=> 'edanz_Editor', 
				'lhs_table'=> 'users', 
				'lhs_key' => 'id',
				'rhs_module'=> 'edanz_Beneficiaries', 
				'rhs_table'=> 'edanz_beneficiaries', 
				'rhs_key' => 'id',
				'relationship_type'=>'many-to-many',
				'join_table'=> 'editors_beneficiaries', 
				'join_key_lhs'=>'editor_id', 
				'join_key_rhs'=>'beneficiary_id'
			)
		)

)

?>

